package com.diandian.backend.entrance.client;

import com.diandian.backend.entrance.client.dto.jingdongHome.BatchQueryUseableInfoReqDTO;
import com.diandian.base.boot.starter.response.BaseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

@FeignClient("jingdong-home-exchange")
//@FeignClient(value = "business-jingdong-home-exchange", url = "http://localhost:10004", path = "")
public interface DianDianJingDongHomeClient {

    /**
     * 批量查询商品库存及可售状态信息
     *
     * @return
     * @throws Exception
     */
    @PostMapping("/business/stock/available/sale/queryOpenUseable")
    BaseResult queryOpenUseable(@RequestHeader(value = "appKey") String appKey,
                                @RequestHeader(value = "appSecret") String appSecret,
                                @RequestHeader(value = "token", required = false) String token,
                                @RequestHeader(value = "operator") String operator,
                                @RequestHeader(value = "belong") String belong,
                                @RequestBody BatchQueryUseableInfoReqDTO data) throws Exception;
}
